<?php


namespace app\controller;


class Push extends BackendController{
    protected $model = null;
    public function _initialize()
    {
        //parent::_initialize();
        $this->model = new \app\model\Push();
    }

    public function data($pic='',$position_id='',$time=''){
        $data=['position_id'=>$position_id,'accept_time'=>$time];
        $this->model->save($data);
        $this->model->pic_path=save_base_img($this->model->id,$pic,config('capture.push_path'));
        $this->model->save();
        $this->success('推送成功');
    }

}